package com.fagp.mew.cms.vo;

import com.mew.common.entity.mail.SysMailRecord;
import lombok.Data;
import lombok.ToString;

import java.util.Date;

/**
 * @author tansonglin
 * @date 2021/9/24 17:06
 */
@Data
@ToString
public class SysMailRecordVO {
    private Integer id;

    /**
     * 类型
     */
    private Integer type;

    /**
     * 信息
     */
    private String info;

    /**
     * 金币
     */
    private Long goldNumber;

    /**
     * 砖石
     */
    private Long jewelNumber;

    /**
     * 状态
     */
    private Integer status;
    /**
     * 领取数量
     */
    private Long receiveNumber;
    /**
     * 全部数量
     */
    private Long allNumber;

    private String addUser;

    private Date addDate;

    private String updateUser;

    private Date updateDate;

    public static SysMailRecordVO builderByEntity(SysMailRecord record){
        SysMailRecordVO vo = new SysMailRecordVO();
        vo.setId(record.getId());
        vo.setType(record.getType());
        vo.setInfo(record.getInfo());
        vo.setGoldNumber(record.getGoldNumber());
        vo.setJewelNumber(record.getJewelNumber());
        vo.setStatus(record.getStatus());
        vo.setAddUser(record.getAddUser());
        vo.setAddDate(record.getAddDate());
        vo.setUpdateUser(record.getUpdateUser());
        vo.setUpdateDate(record.getUpdateDate());
        return vo;
    }
}
